]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
quickSettings: Allow changing the accessible name for quick slider menu buttons
authorLukáš Tyrychtr <ltyrycht@redhat.com>
Tue, 5 Aug 2025 11:54:59 +0000 (13:54 +0200)
committerMarge Bot <marge-bot@gnome.org>
Thu, 14 Aug 2025 09:17:44 +0000 (09:17 +0000)
Allow to specify a more descriptive accessible name for these buttons, this
will be used in the next commit to make the names unique.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3828>

js/ui/quickSettings.js

index 056c6d343b18ed5ddb1c8783f750ed37a8062ebb..921537463816ce83d3f6c304dc4ac8c976a2c23b 100644 (file)
@@ -251,6 +251,10 @@ export const QuickSlider = GObject.registerClass({
             'menu-enabled', null, null,
             GObject.ParamFlags.READWRITE,
             false),
+        'menu-button-accessible-name': GObject.ParamSpec.string(
+            'menu-button-accessible-name', null, null,
+            GObject.ParamFlags.READWRITE,
+            _('Open menu')),
     },
     Signals: {
         'icon-clicked': {},
@@ -337,10 +341,12 @@ export const QuickSlider = GObject.registerClass({
             can_focus: true,
             x_expand: false,
             y_expand: true,
-            accessible_name: _('Open menu'),
         });
         box.add_child(this._menuButton);
 
+        this.bind_property('menu-button-accessible-name',
+            this._menuButton, 'accessible-name',
+            GObject.BindingFlags.SYNC_CREATE);
         this.bind_property('menu-enabled',
             this._menuButton, 'visible',
             GObject.BindingFlags.SYNC_CREATE);